import http from "@/utils/http";

//登录
export const $_login = (data) => {
    return http.post("/api/login", data);
};

//上传组件
export const $_upload= (data) => {
    return http.post("/api/upload",data);
};

//查询所有组件

export const $_get_Data = (data) => {
    return http.post('/api/getData', data);
}

//删除组件

export const $_delete = (data) => {
    return http.post('/api/delete', data);
}

//查看组件的详情

export const $_get_getDetail = (data) => {
    return http.post('/api/getDetail', data);
}

//上传类目 
export const $_add_course = (data) => {
    return http.post('/api/addcourses', data);
}

//查询类目
export const $_get_courses = (data) => {
    return http.post('/api/getcourses', data);
}

//删除类目 
export const $_delete_courses = (data) => {
    return http.post('/api/deletecourses', data);
}

//添加题目  
export const $_add_courseslist = (data) => {
    return http.post('/api/addcourseslist', data);
}

// 查询题目列表 
export const $_get_courseslist = (data) => {
    return http.post('/api/getcourseslist', data);
}

//删除题目列表
export const $_delete_courseslist = (data) => {
    return http.post('/api/deletecourseslist', data);
}

//添加题目列表
export const $_add_content = (data) => {
    return http.post('/api/addcontent', data);
}

//查询题目内容 
export const $_get_content = (data) => {
    return http.post('/api/getcontent', data);
}